package com.bys.system.vo;

/**
 * 获取当前用户信息帮助类
 */
public class LoginUserHelper {
    private static ThreadLocal<Long> userId = new ThreadLocal<>();
    private static ThreadLocal<String> username = new ThreadLocal<>();

    public static Long getUserId() {
        return userId.get();
    }

    public static void setUserId(Long id) {
        userId.set(id);
    }

    public static String getUsername() {
        return username.get();
    }

    public static void setUsername(String name) {
        username.set(name);
    }
}

